package cc.lucien.factory;

/**
 * @author lucien-ma
 * @date 2021/11/7
 * @apiNote
 */
public class ComputerFactory {

    public Computer createComputer(String name) {
        Computer computer = null;
        if ("a".equals(name)) {
            computer = new ComputerA();
        }
        if ("b".equals(name)) {
            computer = new ComputerB();
        }
        return computer;
    }
}
